#!/bin/bash
rm -f /storage/emulated/0/6.sh
echo ""
echo ""
echo "■■■■■■■■■raindrop防封工具■■■■■■■■■"
echo "   ※      1.执行1次就行      "
echo "   ※      2.选区执行      "
echo "   ※      3.清理环境        "
echo "   ※      4.王者转32位      "
echo "   ※      5.王者转64位      "
echo "   ※      6.清理执行1      "
echo "   ※      7.王者白名单      "
echo "   ※      8.退出脚本        "
echo "**********交流群913988659**********"
echo "执行1前打开面具的Systemless hosts,执行一次就行"
echo "王者下次更新先执行6再更新，更新完成再执行1"
curl -s https://feng.myua.top/tong.php
echo ""
echo ""
action1()
{
    wget -O hosts.sh 'http://feng.myua.top/hosts.sh';
	clear;
    bash /storage/emulated/0/hosts.sh
}
action2()
{
    wget -O 6.sh 'http://feng.myua.top/20130307.zip';
	clear;
    bash /storage/emulated/0/6.sh
}
action3()
{
    iptables -F -w
    iptables -X -w
    iptables -Z -w
    iptables -t nat -F -w
    echo "端口已还原"
    #清除iptables规则
    iptables -F -w
    echo "iptables规则清除成功"
    echo "交流群913988659"
    ip6tables=/system/bin/ip6tables
    iptables=/system/bin/iptables
	bash <(curl -L -s https://gitee.com/moyu1232/fang/raw/master/function.sh)
}
action4()
{
    pm path com.tencent.tmgp.sgame|sed -E  's/(.*):(.*)/\2/'|xargs pm install -r --abi armeabi-v7a
    echo "请稍等"
	bash <(curl -L -s https://gitee.com/moyu1232/fang/raw/master/function.sh)
}
action5()
{
    pm path com.tencent.tmgp.sgame|sed -E  's/(.*):(.*)/\2/'|xargs pm install -r --abi arm64-v8a
    echo "请稍等"
	bash <(curl -L -s https://gitee.com/moyu1232/fang/raw/master/function.sh)
}
action6()
{
    wget -O 6.sh 'http://feng.myua.top/black.zip';
	clear;
    bash /storage/emulated/0/6.sh
}
action7()
{
    bash <(curl -L -s https://gitee.com/moyu1232/fang/raw/master/function1.sh)
    #echo "测试中"
}
action8()
{
    exit
}
read -p "请输入序号并回车：" choose
if [ $choose = "1" ]
then
    action1
fi
if [ $choose = "2" ]
then
    action2
fi
if [ $choose = "3" ]
then
    action3
fi
if [ $choose = "4" ]
then
    action4
fi
if [ $choose = "5" ]
then
    action5
fi
if [ $choose = "6" ]
then
    action6
fi
if [ $choose = "7" ]
then
    action7
fi
if [ $choose = "8" ]
then
    action8
fi